package com.bys.controller;

import com.bys.service.PayService;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
public class PayConsmerController {
    @Resource
    private PayService payService;
    @GetMapping("/consumer/getid/string/{payId}")
    public String getId(@PathVariable Integer payId){
        return payService.getStringGetId(payId);
    }
    @GetMapping("/hello")
    public String helloWorld(){
        return "hello, world!!";
    }
    @GetMapping("/consumer/timeout")
    public String timeoutTest(){
       return payService.timeoutTest();
    }

}
